<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  

  
  <title>bootstrap组件 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="响应式页面开发123@media screen and (min-width: *px) and (max-width)&amp;#123;&amp;#125;  栅格布局将屏幕分成12格  元素所占屏幕大小：col-屏幕型号-num  元素距左侧几格：col-屏幕型号-offset-num   网页开发中的单位px：相对于屏幕分辨率的长度单位 em：相对于当前文本内的字体尺寸 rem 与 em 相似，相对于">
<meta name="keywords" content="bootstrap">
<meta property="og:type" content="article">
<meta property="og:title" content="bootstrap组件">
<meta property="og:url" content="http://yoursite.com/2019/10/16/bootstrap组件/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="响应式页面开发123@media screen and (min-width: *px) and (max-width)&amp;#123;&amp;#125;  栅格布局将屏幕分成12格  元素所占屏幕大小：col-屏幕型号-num  元素距左侧几格：col-屏幕型号-offset-num   网页开发中的单位px：相对于屏幕分辨率的长度单位 em：相对于当前文本内的字体尺寸 rem 与 em 相似，相对于">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2019-10-17T08:21:37.375Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="bootstrap组件">
<meta name="twitter:description" content="响应式页面开发123@media screen and (min-width: *px) and (max-width)&amp;#123;&amp;#125;  栅格布局将屏幕分成12格  元素所占屏幕大小：col-屏幕型号-num  元素距左侧几格：col-屏幕型号-offset-num   网页开发中的单位px：相对于屏幕分辨率的长度单位 em：相对于当前文本内的字体尺寸 rem 与 em 相似，相对于">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
</head>
</html>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-bootstrap组件" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/10/16/bootstrap组件/" class="article-date">
  <time datetime="2019-10-16T08:22:17.000Z" itemprop="datePublished">2019-10-16</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/bootstrap/">bootstrap</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      bootstrap组件
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <hr>
<h2 id="响应式页面开发"><a href="#响应式页面开发" class="headerlink" title="响应式页面开发"></a>响应式页面开发</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">@media screen and (min-width: *px) and (max-width)&#123;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="栅格布局"><a href="#栅格布局" class="headerlink" title="栅格布局"></a>栅格布局</h2><p>将屏幕分成12格</p>
<ul>
<li><p>元素所占屏幕大小：<code>col-屏幕型号-num</code></p>
</li>
<li><p>元素距左侧几格：<code>col-屏幕型号-offset-num</code></p>
</li>
</ul>
<h2 id="网页开发中的单位"><a href="#网页开发中的单位" class="headerlink" title="网页开发中的单位"></a>网页开发中的单位</h2><p>px：相对于屏幕分辨率的长度单位</p>
<p>em：相对于当前文本内的字体尺寸</p>
<p>rem 与 em 相似，相对于 HTML 根节点的字体单位</p>
<h3 id="px"><a href="#px" class="headerlink" title="px"></a>px</h3><p>px 是相对于屏幕分辨率的单位</p>
<p>px 的大小无法跟随屏幕放大缩小</p>
<h3 id="em"><a href="#em" class="headerlink" title="em"></a>em</h3><p>1em = 16px（但不完全是）</p>
<p>em 会继承父级元素的字体大小，适合手机端、平板开发</p>
<p>IE 的部分版本不支持 em</p>
<h3 id="rem"><a href="#rem" class="headerlink" title="rem"></a>rem</h3><p>rem 与 em 类似</p>
<p>rem 会继承根元素的字体大小</p>
<h2 id="bootstrap-组件"><a href="#bootstrap-组件" class="headerlink" title="bootstrap 组件"></a>bootstrap 组件</h2><ol>
<li><p>role：标识普通标签，使之语义化，方便浏览器对其具体的功能进行识别</p>
</li>
<li><p>aria-label：当焦点落到输入框时，读屏软件就会读出输入框内容</p>
</li>
<li><p>tabIndex：可以设置键盘上的 tab 键在控件中进行移动</p>
</li>
<li><p>通过该自定义属性管理交互、效果</p>
</li>
</ol>
<h3 id="字体图标"><a href="#字体图标" class="headerlink" title="字体图标"></a>字体图标</h3><ol>
<li><p>glyphicon</p>
</li>
<li><p>glyphicon-具体图标</p>
</li>
</ol>
<h3 id="下拉菜单"><a href="#下拉菜单" class="headerlink" title="下拉菜单"></a>下拉菜单</h3><ol>
<li><p>.dropdown 控制组件为下拉</p>
</li>
<li><p>.dropdown-menu-right 代替 .pull-right 右对齐</p>
</li>
<li><p>.divider 分割线</p>
</li>
</ol>
<h3 id="控件组"><a href="#控件组" class="headerlink" title="控件组"></a>控件组</h3><ol>
<li><p>.input-group 表示控件组</p>
</li>
<li><p>.input-group-addon 可放置额外内容和图标</p>
</li>
</ol>
<h3 id="导航"><a href="#导航" class="headerlink" title="导航"></a>导航</h3><ol>
<li><p>以一个带有 class .nav 的无序列表开始</p>
</li>
<li><p>.nav-tabs 代表可切换的导航</p>
</li>
<li><p>.nav-pills 代表胶囊导航</p>
</li>
<li><p>.nav-justified 使导航垂直</p>
</li>
</ol>
<h3 id="分页"><a href="#分页" class="headerlink" title="分页"></a>分页</h3><ol>
<li><p>.pagination 在父元素中添加表示分页</p>
</li>
<li><p>.pager 放置在翻页区域</p>
</li>
<li><p>.previous 把链接向左对齐，.next 把链接向右对齐</p>
</li>
</ol>
<h3 id="进度条"><a href="#进度条" class="headerlink" title="进度条"></a>进度条</h3><ol>
<li><p>.progress 表示进度条</p>
</li>
<li><p>通过状态类改变进度条的颜色</p>
</li>
<li><p>.progress-bar-striped 使得进度条颜色渐变</p>
</li>
</ol>
<h3 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h3><ol>
<li><p>.list-group 代表列表组</p>
</li>
<li><p>.badge 代表状态数</p>
</li>
<li><p>.active 代表选中状态</p>
</li>
</ol>
<h3 id="面板"><a href="#面板" class="headerlink" title="面板"></a>面板</h3><ol>
<li><p>.panel 代表面板</p>
</li>
<li><p>.panel-body 代表面板内容</p>
</li>
<li><p>.panel-footer 代表面板的注脚</p>
</li>
</ol>
<h2 id="Bootstrap-中的插件"><a href="#Bootstrap-中的插件" class="headerlink" title="Bootstrap 中的插件"></a>Bootstrap 中的插件</h2><ol>
<li><p>Bootstrap 插件依赖 Bootstrap.js</p>
</li>
<li><p>Bootstrap.js 基于 JQuery</p>
</li>
</ol>
<h3 id="data-属性"><a href="#data-属性" class="headerlink" title="data 属性"></a>data 属性</h3><ol>
<li><p>通过 data 属性控制页面交互</p>
</li>
<li><p>$(document).off(‘.data-api’) 解除属性绑定</p>
</li>
</ol>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/10/16/bootstrap组件/" data-id="ck4r400sq00a7l0w0onsy3xn8" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/bootstrap/">bootstrap</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2019/10/17/ES6解构赋值/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          ES6解构赋值
        
      </div>
    </a>
  
  
    <a href="/2019/10/13/ES6基础入门let、const/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">ES6基础入门let、const</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Ajax/">Ajax</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/CSS/">CSS</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/CSS3/">CSS3</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Dart/">Dart</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Flutter/">Flutter</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Git/">Git</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/HTML/">HTML</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/HTML5/">HTML5</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/JSON/">JSON</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java/">Java</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/JavaScript/">JavaScript</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/QT/">QT</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/React/">React</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Sass/">Sass</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/TheKnowledgeOf/">TheKnowledgeOf</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/TypeScript/">TypeScript</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/bootstrap/">bootstrap</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/jQuery/">jQuery</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Ajax/">Ajax</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CSS/">CSS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CSS3/">CSS3</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Dart/">Dart</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Flutter/">Flutter</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Git/">Git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/HTML/">HTML</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/HTML5/">HTML5</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JSON/">JSON</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Java/">Java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Javascript/">Javascript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/QT/">QT</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/React/">React</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Sass/">Sass</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TheKnowledgeOf/">TheKnowledgeOf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TypeScript/">TypeScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/bootstrap/">bootstrap</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/jQuery/">jQuery</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Ajax/" style="font-size: 12.22px;">Ajax</a> <a href="/tags/CSS/" style="font-size: 18.89px;">CSS</a> <a href="/tags/CSS3/" style="font-size: 17.78px;">CSS3</a> <a href="/tags/Dart/" style="font-size: 14.44px;">Dart</a> <a href="/tags/Flutter/" style="font-size: 16.67px;">Flutter</a> <a href="/tags/Git/" style="font-size: 12.22px;">Git</a> <a href="/tags/HTML/" style="font-size: 14.44px;">HTML</a> <a href="/tags/HTML5/" style="font-size: 12.22px;">HTML5</a> <a href="/tags/JSON/" style="font-size: 10px;">JSON</a> <a href="/tags/Java/" style="font-size: 11.11px;">Java</a> <a href="/tags/JavaScript/" style="font-size: 20px;">JavaScript</a> <a href="/tags/Javascript/" style="font-size: 10px;">Javascript</a> <a href="/tags/QT/" style="font-size: 12.22px;">QT</a> <a href="/tags/React/" style="font-size: 15.56px;">React</a> <a href="/tags/Sass/" style="font-size: 11.11px;">Sass</a> <a href="/tags/TheKnowledgeOf/" style="font-size: 11.11px;">TheKnowledgeOf</a> <a href="/tags/TypeScript/" style="font-size: 10px;">TypeScript</a> <a href="/tags/bootstrap/" style="font-size: 11.11px;">bootstrap</a> <a href="/tags/jQuery/" style="font-size: 13.33px;">jQuery</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/12/">December 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">November 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">October 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">September 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">July 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">May 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/04/">April 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">March 2019</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2019/12/29/Flutter-MaterialApp常用属性介绍/">Flutter-MaterialApp常用属性介绍</a>
          </li>
        
          <li>
            <a href="/2019/12/29/Flutter-ListView/">Flutter-ListView</a>
          </li>
        
          <li>
            <a href="/2019/12/29/Flutter-AppBar/">Flutter-AppBar</a>
          </li>
        
          <li>
            <a href="/2019/12/29/Flutter-TabBar/">Flutter-TabBar</a>
          </li>
        
          <li>
            <a href="/2019/12/29/Flutter-按钮/">Flutter-按钮</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2019 John Doe<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



  </div>
</body>
</html>